#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QLabel>
#include <QProgressBar>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // 创建状态栏
    QStatusBar* stbar = this->statusBar();
    // 设置到窗口中
    this->setStatusBar(stbar);
    //stbar->showMessage("hello", 2000);

    // 创建标签
    QLabel* label = new QLabel("提示消息", this);
    stbar->addWidget(label);
    stbar->addPermanentWidget(label);

    QProgressBar* progress = new QProgressBar();
    progress->setRange(0, 100);
    progress->setValue(50);
    stbar->addWidget(progress);
}

MainWindow::~MainWindow()
{
    delete ui;
}

